package cn.edu.zxj.message_wall.mapper;

import cn.edu.zxj.message_wall.model.MessageInfo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Description：
 *
 * @author: zxj
 * @date: 2024-01-24
 * @time: 13:26:36
 */
@Mapper
public interface MessageWallMapper {

    @Insert("insert into message_info (`from`,`to`,`message`) values (#{from},#{to},#{message})")
    Integer insert(MessageInfo message);

    @Select("select * from message_info where delete_flag = 0")
    List<MessageInfo> selectAllMessages();
}
